Click here to return to the VHDL Reference Guide. | (last edit: 24. september 2012) | ||||||||||
AssertA sequential or concurrent statement used to write out a message when an exception occurs.If the condition is False, the simulator writes out a report to the screen or log file. The simulator may be instructed to halt if the severity is above a particular level. Syntax[Label:] assert Condition [report StringExpression] [severity Expression]; WherePlacement
RulesSequential statements can be labelled in VHDL'93, but not in VHDL'87.The severity Expression must be of type Severity_level, which has the values Note, Warning, Error, Failure. The default severity is Error. Things to rememberCheck carefully the sense of the Condition. The message is written when the Condition is False!SynthesisAssertions do not represent hardware. Synthesis tools ignore them or give a warning.Exampleassert not (Reset = '0' and Set = '0') report "R-S conflict" severity Failure; assert Outputs = ExpectedOutputs report "Outputs differ from expected response"; See AlsoReport, TEXTIO |